home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Franz PD
/
Franz PD Disk #113 (1991-01)(Amiga User Group Deutschland e.V.).zip
/
Franz PD Disk #113 (1991-01)(Amiga User Group Deutschland e.V.).adf
/
Rechnungen
/
rechnungen
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1989-07-03
|
18KB
|
490 lines
REM Copyright 1990 by
REM Andreas Lorenz
REM Berlinerstr.862
REM 5000 Koeln 80
REM!!!!Bitte durchsuchen Sie das Ganze Listing!!!!!!!!
REM Es sind 4 Stellen wo Sie Ihre Daten Einsetzen muessen!!
OPEN "R",#1,"Rechnung",50
FIELD #1,8 AS p$,8 AS m$,26 AS k$,8 AS v$
z%=0
SCREEN 1,640,232,3,2
WINDOW 1,"Rechnungen `90",(0,0)-(631,218),2,1
WINDOW OUTPUT 1
ON BREAK GOSUB ende
BREAK ON
COLOR 1,0
Init:
DIM Rot%(8),Gruen%(8),Blau%(8),aktRot%(8),aktGruen%(8),aktblau%(8)
Rot%(1)= 0 :Gruen%(1)= 0 :Blau%(1)= 0
Rot%(2)= 15:Gruen%(2)= 15:Blau%(2)= 15
Rot%(3)= 12:Gruen%(3)= 8 :Blau%(3)= 7
Rot%(4)= 9 :Gruen%(4)= 5 :Blau%(4)= 3
Rot%(5)= 15:Gruen%(5)= 15:Blau%(5)= 10
Rot%(6)= 15:Gruen%(6)= 15:Blau%(6)= 0
Rot%(7)= 13:Gruen%(7)= 0 :Blau%(7)= 3
Rot%(8)= 13:Gruen%(8)= 13:Blau%(8)= 11
FOR i%= 1 TO 8
PALETTE i% -1,Rot%(i%)/15,Gruen%(i%)/15,Blau%(i%)/15
NEXT i%
Leer$=SPACE$(80)
cr$= "Rechnungen `90"
MENU 5,0,1,cr$
start:
GOSUB IOFeld: GOSUB BedinFeld
AdrQ$ = adr$
WHILE 1
CALL Mklick (0,0,adr%)
ON adr% GOSUB 1,477,loca,2,PRrINT,ende
adr$ = AdrQ$
WEND
loca:
LOCATE 19,1
PRINT" "
LOCATE 10,1
PRINT" "
LOCATE 10,1
INPUT "Nr";z%
LOCATE 10,1
PRINT" "
LOCATE 10,1
PRINT"Neue Eingabe durch Menupunkt Nächster!"
PRINT"Wenn Sie weiter machen mit Goto wieder zum Ende der Datei springen"
PRINT"(Ende d.Datei+1)"
b%=z%
GET #1,z%
LOCATE 19,1
PRINT ""p$""
LOCATE 19,16
PRINT""m$""
LOCATE 19,27
PRINT k$
LOCATE 19,48
PRINT ""v$"DM"
z%=z%-1
b%=b%-1
RETURN
477 :
LOCATE 19,1
PRINT" "
LOCATE 10,1
PRINT" "
LOCATE 10,1
PRINT"Neue Eingabe durch Menupunkt Nächster!"
PRINT"Einer vor durch Goto(Ende d.Datei+1)(vor Print bitte ans Ende springen!)"
GET #1,z%
LOCATE 19,1
PRINT ""p$""
LOCATE 19,16
PRINT""m$""
LOCATE 19,27
PRINT k$
LOCATE 19,48
PRINT ""v$"DM"
z%=z%-1
RETURN
2 :
LOCATE 10,5
PRINT "Empfänger:"
INPUT "Name:";x$
INPUT "Str:";y$
INPUT "Ort:";q$
INPUT "Datum:";d$
INPUT "Zeit d.Rechnung:";e$
INPUT "Richtig (j/n)";h$
IF h$="n" THEN GOTO 2
IF h$="j" THEN GOTO adr
PRINT " "
adr:
LOCATE 1,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
LOCATE 10,5
PRINT "Drucke Kopf"
LOCATE 1,1
REM Hier muessen Ihre Daten rein
PRINT "Aussteller:"
PRINT "Firma A.Lorenz"
PRINT "Andreas Lorenz"
PRINT "Berliner Str.862"
PRINT "Empfänger:"
PRINT ""x$"
PRINT ""y$""
PRINT ""q$""
LOCATE 1,44
REM Und hier wieder
PRINT "Bank/Postgiro:"
LOCATE 2,44
PRINT "Bank123"
LOCATE 3,44
PRINT "Blz:123456789"
LOCATE 4,44
PRINT "Kto:123456789"
LOCATE 9,1
PRINT "RECHNUNG Nr."e$""
LOCATE 9,44
PRINT "Datum:"d$""
RETURN
1 :
LOCATE 10,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
LOCATE 10,5
PRINT "Eingabe der Daten:"
INPUT"Datum:";a$
INPUT"Anzahl:";b$
INPUT"Bezeichnung:";c$
INPUT"Preis:";l$
INPUT "Richtig (j/n)";h$
IF h$="n" THEN GOTO 1 :ELSE GOTO 12
12 :
z%=z%+1
IF x=0 THEN
LOCATE 1,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
LOCATE 1,1
PRINT"Datum: Anzahl: Bezeichung: Preis:"
f=2
END IF
x=x+1
f=f+1
IF f=9 THEN
LOCATE 1,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
LOCATE 1,1
PRINT"Datum: Anzahl: Bezeichung: Preis:"
f=2
END IF
LOCATE f,1
PRINT ""a$""
LOCATE f,16
PRINT""b$""
LOCATE f,27
PRINT c$
LOCATE f,48
PRINT ""l$"DM"
LSET p$=a$
LSET m$=b$
LSET k$=c$
LSET v$=l$
PUT #1,z%
RETURN
PRrINT:
b%=z%
z%=1
a%=a%+1
LOCATE 10,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
CLOSE #1
LOCATE 10,1
INPUT "Wirklich (j/n)";h$
IF h$="n" THEN RETURN :ELSE GOTO 78
78 :
REM Hier muessen Ihre Daten rein
LPRINT "Aussteller:"
LPRINT "Firma A.Lorenz"
LPRINT "Andreas Lorenz"
LPRINT "Berliner Str.862"
LPRINT "5000 Koeln 80"
LPRINT
LPRINT "Empfänger:";CHR$(13);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"Bank/Postgiro:"
LPRINT ""x$"";CHR$(13);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"Bank123"
LPRINT ""y$"";CHR$(13);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"Blz:12345"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);"Kto:12345"
LPRINT ""q$""
LPRINT
LPRINT
LPRINT
LPRINT "RECHNUNG Nr."e$"";CHR$(13);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"Datum:"d$""
LPRINT "Datum:";CHR$(9);" Anzahl:";CHR$(9);" Bezeichnung:";CHR$(9);CHR$(9);" Preis:"
OPEN "R",#1,"Rechnung",50
FIELD #1,8 AS p$,8 AS m$,26 AS k$,8 AS v$
b%=b%+1
6 :
GET #1,z%
LPRINT ""p$"";CHR$(13);CHR$(9);" "m$"";CHR$(13);CHR$(9);CHR$(9);CHR$(9);" "k$"";CHR$(13);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);" "v$"DM"
z%=z%+1
IF z%=b% THEN GOTO 56
GOTO 6
56 :
LOCATE 10,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
LOCATE 10,1
INPUT"Bitte Gesamtergebnis Eingeben:";g$
INPUT"- wieviel Prozent";z$
INPUT"Zu zahlende Summe:";j$
INPUT "Richtig (j/n)";h$
IF h$="n" THEN GOTO 56 :ELSE GOTO 22
22 :
IF f>=9 THEN
LOCATE 1,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
f=2
END IF
f=f+1
LOCATE f,48
PRINT"-------"
f=f+1
LOCATE f,48
PRINT""g$"DM"
f=f+1
LOCATE f,48
PRINT"-------"
f=f+1
LOCATE f,45
PRINT "- "z$"%"
f=f+1
LOCATE f,45
PRINT "= "j$"DM"
f=f+1
LOCATE f,48
PRINT "======="
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);" -------"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);" "g$"DM"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);" -------"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"- "z$"%"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);"= "j$"DM"
LPRINT CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);CHR$(9);" ======="
IF a%=2 THEN GOTO ende
RETURN
Mausinfo:
WHILE MOUSE(0) <>0:WEND
WHILE MOUSE(0)=0:WEND
LINE (0,0)-(300,88),0,bf
GOSUB IOFeld
CALL Tonfolge (1,100)
CALL klick (303,196,86,14,"INFO",0,1,1,0)
RETURN
ende:
CALL klick (399,196,86,14,"Ausgang",6,1,1,0)
CALL Requester ("Wollen Sie Rechnungen`90 verlassen?","JA","","NEIN",98,1,1,2,Flag%)
IF Flag%=1 THEN
CLOSE #1
LIBRARY CLOSE
WINDOW CLOSE 1
SCREEN CLOSE 1
BREAK OFF
STOP
END IF
IF Flag%= 3 THEN
GOSUB IOFeld
LOCATE 1,1
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
CALL klick (399,196,86,14,"Ausgang",0,1,1,0)
RETURN
END IF
GOTO ende
IOFeld:
CALL Fenster (6,3,618,159,1,2,0)
RETURN
BedinFeld:
CALL Tonfolge (1,100)
CALL Fenster (6,166,618,50,1,2,0)
CALL klick ( 15,172,86,14,"Nächster" ,0,1,1,2)
CALL klick (15,196,86,14,"1er Zur.",0,1,1,2)
CALL klick (121,172,86,14,"GoTo" ,0,1,1,2)
CALL klick (121,196,86,14,"Adresse" ,0,1,1,2)
CALL klick (399,172,86,14,"Print" ,0,1,1,2)
CALL klick (399,196,86,14,"Ausgang",0,1,1,2)
RETURN
SUB Requester (ReqTxt$,LTxt$,Mtxt$,RTxt$,xSet%,TFarbe%,VFarbe%,hFarbe%,Flag%) STATIC
CALL Fenster (xSet%,40,295,70,VFarbe%,hFarbe%,1)
COLOR 1,0
IF INSTR(1,ReqTxt$,"|")= 0 THEN
LOCATE 8,3+INT(xSet%/8)
PRINT ReqTxt$;
ELSE
LOCATE 7,3+INT(xSet%/8)
PRINT LEFT$(ReqTxt$,INSTR(1,ReqTxt$,"|") -1);
LOCATE 9,3 +INT(xSet%/8)
PRINT RIGHT$(ReqTxt$,LEN(ReqTxt$) -INSTR(1,ReqTxt$,"|"));
END IF
IF LTxt$ <>"" THEN CALL klick ( 20 +xSet%,84,80,14,LTxt$,0,1,1,0)
IF Mtxt$ <>"" THEN CALL klick (110 +xSet%,84,80,14,Mtxt$,0,1,1,0)
IF RTxt$ <>"" THEN CALL klick (200 +xSet%,84,80,14,RTxt$,0,1,1,0)
COLOR 0,1
CALL Tonfolge (1,255)
ReqMaus1:
WHILE MOUSE(0) <> 0:WEND
WHILE MOUSE(0) = 0 :WEND
xPos% =MOUSE(1)
yPos% =MOUSE(2)
IF yPos% > 82 AND yPos% < 102 THEN
IF LTxt$<>"" THEN
IF xPos%> 20 +xSet% AND xPos% <100 +xSet% THEN Flag%= 1:GOTO reqend
END IF
IF Mtxt$<>"" THEN
IF xPos%> 110 +xSet% AND xPos% <190 +xSet% THEN Flag%= 2:GOTO reqend
END IF
IF RTxt$ <> "" THEN
IF xPos%> 200 +xSet% AND xPos% <280 +xSet% THEN Flag%= 3:GOTO reqend
END IF
END IF
GOTO ReqMaus1
reqend:
COLOR 1,0
CALL Tonfolge (1,100)
END SUB
SUB Mklick (xPos%,yPos%,adr%) STATIC
SHARED adr$
adr%=0
WHILE MOUSE(0) <> 0:WEND
WHILE MOUSE(0) = 0:WEND
xPos% = MOUSE(1) : yPos% = MOUSE(2)
FOR i% = 1 TO LEN(adr$) STEP 12
IF xPos% > VAL(MID$(adr$,i%,3))THEN
IF xPos% < VAL(MID$(adr$,i% +3,3)) THEN
IF yPos% > VAL(MID$(adr$,i% +6,3)) THEN
IF yPos% < VAL(MID$(adr$,i% +9,3)) THEN
adr% = INT((i%-1)/12) +1
i% = LEN(adr$)
END IF
END IF
END IF
END IF
NEXT i%
END SUB
SUB klick(xPos%,yPos%,breit%,hoch%,Txt$,VGrund%,Hgrund%,aktiv%,Mode%) STATIC
SHARED adr$
LINE (xPos%,yPos%+2)-(xPos%+breit%+4,yPos%+hoch%+2),0,bf
LINE (xPos%,yPos%)-(xPos%+breit%,yPos%+hoch%),VGrund%,bf
LINE (xPos%+2,yPos%+1)-(xPos%+breit%-2,yPos%+hoch%-1),Hgrund%,bf
XTP%=INT(xPos%+((breit%-(LEN(Txt$)*8))/2)+0.5)
yTP%=INT(yPos%+((hoch%+8)/2)+0.5)-1
POKEW WINDOW(8)+36,XTP%:POKEW WINDOW(8)+38,yTP%
COLOR VGrund%,Hgrund%:PRINT Txt$;
IF aktiv%=0 THEN
FOR i%=yTP%-7 TO yTP%-1 STEP 2
LINE(XTP%,i%)-(XTP%+(LEN(Text$)*8),i%),Hgrund%,b
NEXT i%
breit%=999:hoch%=999
END IF
IF Mode%=1 THEN
adr$=RIGHT$(" "+STR$(xPos%),3)+RIGHT$(" "+STR$(xPos%+breit%),3)
adr$=adr$+RIGHT$(" "+STR$(yPos%),3)+RIGHT$(" "+STR$(yPos%+hoch%),3)
END IF
IF Mode%=2 THEN
adr$=adr$+RIGHT$(" "+STR$(xPos%),3)+RIGHT$(" "+STR$(xPos%+breit%),3)
adr$=adr$+RIGHT$(" "+STR$(yPos%),3)+RIGHT$(" "+STR$(yPos%+hoch%),3)
END IF
END SUB
SUB Fenster (xPos%,yPos%,breit%,hoch%,VFarbe%,hFarbe%,Schatten%) STATIC
IF Schtten%=1 THEN
LINE (xPos%+6,yPos%+2)-(xPos%+breit%+6,yPos%+hoch%+3),0,bf
END IF
LINE (xPos%,yPos%)-(xPos%+breit%,yPos+hoch%),VFarbe,b
LINE (xPos%+1,yPos%)-(xPos%+breit%-1,yPos%+hoch%),VFarbe,b
LINE (xPos%+2,yPos%+1)-(xPos%+breit%-2,yPos%+hoch%-1),VFarbe,b
LINE (xPos%+3,yPos%+1)-(xPos%+breit%-3,yPos%+hoch%-1),VFarbe,b
LINE (xPos%+4,yPos%+2)-(xPos%+breit%-4,yPos%+hoch%-2),hFarbe,b
END SUB
SUB Tonfolge (SFolge%,LautSt%) STATIC
FOR Ton=1 TO SFolge%
SOUND 493,1,LautSt%,0:SOUND 1046,1,LautSt%,0
SOUND 587,1,LautSt%,0
NEXT Ton
END SUB